package com.coolingme.genericity;

/**
 * 泛型类
 *
 * @author wangyue
 * @date 2019/4/4 10:55
 */
public class Genericity<T> {

    private T t;

    public Genericity(T t) {
        this.t = t;
    }

    public T getT() {
        return t;
    }

    public void setT(T t) {
        this.t = t;
    }

    @Override
    public String toString() {
        return "Genericity{" +
                "t=" + t +
                '}';
    }

    public void hello() {
        System.out.println("t的类型为:" + t.getClass().getName());
    }
}
